function bind(el, eventType, callback) {
    if (typeof el.addEventListener === "function") {
        // 标准浏览器
        el.addEventListener(eventType, callback, false)
    } else if (typeof el.attachEvent === "function") {
        // 兼容IE浏览器
        el.attachEvent("on" + eventType, callback)
    }
}
function mouseoverHandler(e) {
    // 兼容写法
    var target = e.target || e.srcElement
    var outer = document.getElementById("subject")
    var list = outer.getElementsByTagName("li")
    for (var i = 0; i < list.length; i++) {
        list[i].className = ""
    }

    while (target.tagName != "LI" || target.tagName == "BODY") {
        target = target.parentNode
    }

    target.className = "big"
}

function initList() {
    var outer = document.getElementById("subject")
    var list = outer.getElementsByTagName("li")
    for (var i = 0; i < list.length; i++) {
        bind(list[i], "mouseover", mouseoverHandler)
    }
}

initList()
